<template>
  <div class="batch-actions-menu-wrapper" v-show="data.length > 0 && show">
    <div class="batch-actions-menu">
      <div class="batch-actions">

        <div>
          <span class="font-bold">{{ data.length }} Selected</span>
        </div>
        <div class="w-0.5 mx-4 h-8 bg-gray-5"></div>

        <div style="font-size: 0;">
          <slot></slot>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps(['data', 'show'])
</script>

<style lang="scss" scoped>
.batch-actions-menu-wrapper {
  align-self: center;
  bottom: 0;
  display: flex;
  justify-content: center;
  width: -moz-fit-content;
  width: fit-content;
  z-index: 3000;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  position: fixed;
}

.batch-actions-menu {
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: sticky;
  z-index: 3000;
}

.batch-actions {
  bottom: 0;
  left: 0;
  position: relative;
  transition: opacity 150ms, transform 150ms;
  height: 63px;
  z-index: 1000001;
  background-color: var(--color-white);
  border-radius: 5px;
  box-shadow: 0px 15px 50px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  flex-direction: row;
  align-items: center;
  display: flex;
  bottom: 0;
  padding: 0 16px;
  user-select: none;
}
</style>